commit
9f4a586f1227a8287e1d6acd95893f6098756ee2
Author: Nicholas Vinson <nvinson234@gmail.com>
Date: Tue Feb 24 19:48:41 2026 -0500
util/probe: Save strrchr() ret val to const data ptr
With glibc-2.43 implementing the C23 standard, strrchr() now returns
"const char *" when its first argument is "const char *".
The fix is update all pointers receiving strrchr()'s return value so
that they are now "const char *" instead of "char *".
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name fix-for-gcc-2.16-1.patch
grub_util_guess_bios_drive (const char *orig_path)
{
char *canon;
- char *ptr;
+ const char *ptr;
canon = grub_canonicalize_file_name (orig_path);
if (!canon)
return NULL;
grub_util_guess_efi_drive (const char *orig_path)
{
char *canon;
- char *ptr;
+ const char *ptr;
canon = grub_canonicalize_file_name (orig_path);
if (!canon)
return NULL;
grub_util_guess_baremetal_drive (const char *orig_path)
{
char *canon;
- char *ptr;
+ const char *ptr;
canon = grub_canonicalize_file_name (orig_path);
if (!canon)
return NULL;